<include file="Public/header"/>
<div class="wrapper m-t">

    <div class="row animated fadeInRight">
        <div class="col-md-4">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>个人资料</h5>
                </div>
                <div>
                    <div class="ibox-content border-left-right text-center">
                        <img alt="image" src="{$userinfo.headimgurl}" width="200px">
                    </div>
                    <div class="ibox-content profile-content">
                        <h4><i class="fa fa-user"></i> <strong>昵称：{$userinfo.nickname}</strong></h4>

                        <p><i class="fa fa-compass"></i> 区域：{$userinfo.area_name}</p>

                        <p><i class="fa fa-users"></i> 用户组：{$userinfo.title}</p>

                        <p><i class="fa fa-calendar"></i> 注册时间：{$userinfo.sr_time}</p>


                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-8">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>行程列表</h5>
                </div>
                <div class="ibox-content">
                    <div>




                            <div class="feed-activity-list">
                                <volist name="_list" id="vo">
                                <div class="feed-element no-padding">
                                    <a class="pull-left">
                                        <i class="fa fa-circle text-info"></i>
                                    </a>

                                    <div class="media-body ">
                                        <strong class="h4">{$vo.title}</strong>
                                        <br>
                                        <small class="text-muted">{$vo.sr_time|date='Y-m-d H:i:s',###}</small>
                                        <div class="pull-right">
                                            <!--<a class="btn btn-info"><i class="fa fa-pencil-square-o"></i> 回复 </a>-->
                                            <a onclick="showDetail('{$vo.title}','{$vo.content}','{$vo.sr_time}')" class="btn btn-primary" data-toggle="modal" data-target="#info">
                                                <i class="fa fa-file-text-o"></i> 详情
                                            </a>
                                            <a onclick="dilis({$vo.uid},'{$vo.gl_time}')" class="btn btn-success" data-toggle="modal" data-target="#mapmarker">
                                                <i class="fa fa-map-marker"></i> 地理行程
                                            </a>
                                        </div>
                                    </div>
                                </div>

                                </volist>
                            </div>


                    </div>

                </div>
                <div>{$_page}</div>
            </div>

        </div>
    </div>
</div>

<!--拜访详情-->
<div class="modal inmodal" id="info" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content animated bounceInRight">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">
                    <span aria-hidden="true">&times;</span>
                    <span class="sr-only">关闭</span>
                </button>
                <h3 class="font-bold h3" id="titles">标题</h3>
                <h6 class="text-muted text-center m-t" id="sr_time"></h6>
            </div>
            <div class="modal-body">
                <p class="m-t" id="contents">内容</p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-info" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>
<!--拜访详情 endif-->

<!--行程列表-->
<div class="modal inmodal" id="mapmarker" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content animated bounceInRight">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">
                    <span aria-hidden="true">&times;</span>
                    <span class="sr-only">关闭</span>
                </button>
                <h3 class="font-bold h3">行程列表</h3>
            </div>

            <div class="panel-body">
                <ul id="weizi" class="sortable-list connectList agile-list">



                </ul>
            </div>

            <div class="modal-footer">
                <button type="button" class="btn btn-info" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>
<include file="Public/footer"/>
<!-- Peity -->
<script src="__PUBLIC__/Admin/js/plugins/peity/jquery.peity.min.js"></script>
<script src="__PUBLIC__/Admin/js/demo/peity-demo.js"></script>
<script>
    function showDetail(title,content,times){
        $("#titles").html(title);
        $("#contents").html(content);
        $("#sr_time").html(getLocalTime(times))

    }
    function dilis(uid,gl_time){
        var txt='';
        $.post("{:U('AccessControl/location')}",{uid:uid,gl_time:gl_time},function(re){
            if(re.state=='success'){
            var info=re.info;
                $.each(info,function(k,v){
                    txt += '   <li class="success-element">'+ v.label;
                    txt += '     <div class="agile-detail text-muted">';
                    txt += '       <i class="fa fa-clock-o"></i> '+ getLocalTime(v.sr_time);
                    txt += '     </div>';
                    txt += '   </li>';
                })

             $("#weizi").html(txt);

            }else{
                txt += '   <li class="success-element">'+ re.info;
                txt += '     <div class="agile-detail text-muted">';
                txt += '     </div>';
                txt += '   </li>';
                $("#weizi").html(txt);
            }

        })

    }
</script>


